﻿using Commons.Responses;
using EntityModels.E04.Interactions;

namespace IRepositories
{
    public interface ICommentRepository:IBaseRepository<int,Comment>
    {
        /// <summary>
        /// 获取作品的顶级评论
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="photographId"></param>
        /// <returns></returns>
        Task<List<Comment>> GetCommentsByPhotographIdAsync(int pageIndex,int pageSize,string photographId);
        /// <summary>
        /// 获取评论的回复
        /// </summary>
        /// <param name="commentId"></param>
        /// <returns></returns>
        Task<List<Comment>> GetRepliesByCommentIdAsync(int commentId);
        /// <summary>
        /// 点赞
        /// </summary>
        /// <param name="commentId"></param>
        /// <returns></returns>
        Task<MessageResponse> IncreaseLikeAsync(int commentId);
        /// <summary>
        /// 取消点赞
        /// </summary>
        /// <param name="commentId"></param>
        /// <returns></returns>
        Task<MessageResponse> ReduceLikeAsync(int commentId);
    }

}
